<template>
  <div>
    <div v-if="type == 1">
      <div class="main">
        <div v-for="(item, i) in list" :key="i" class="list-node">
          <shipu-type-block :id="item"></shipu-type-block>
        </div>
      </div>
    </div>
    <div v-else>
      <div class="main-list">
        <div v-for="(item, i) in list" :key="i" class="list-node">
          <shipu-type-list :id="item"></shipu-type-list>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import ShipuTypeBlock from "./ShipuShowType/ShipuTypeBlock.vue";

import ShipuTypeList from "./ShipuShowType/ShipuTypeList.vue";
export default {
  components: { ShipuTypeList, ShipuTypeBlock },
  props: {
    list: Array,
    type: {
      type: Number,
      default: 2,
    },
  },
};
</script>

<style lang="less" scoped>
.main {
  width: 960px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  .list-node {
    margin: 20px;
  }
}
.main-list {
  width: 960px;
  margin: 0 auto;
    .list-node {
    margin: 20px 0px;
  }
}
</style>

